﻿using System;
using System.IO;

using JetBrains.Annotations;

namespace octalforty.Componento.Impl
{
    public static class TextWriterExtensions
    {
        [StringFormatMethod("format")]
        public static void WriteLine(this TextWriter textWriter, ConsoleColor color, string format, params object[] args)
        {
            using(new ConsoleStylingScope(color))
                textWriter.WriteLine(format, args);
        }
    }
}
